<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
</head>

<body>

    <script>
        const _flatten = arr => {
            // 补全代码
            let result = [];
            const digui = (item) => {
                if(typeof item === 'number') {
                    result.push(item);
                }
                else if(typeof item === 'object') {
                    for(let i = 0; i < item.length; i ++) {
                        digui(item[i]);
                    } 
                } 
            }
            digui(arr);
            return result;
        }
    </script>
</body>

</html>